﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class yonetim_Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        CKFinder.FileBrowser yeni = new CKFinder.FileBrowser();
        yeni.BasePath = "../ckfinder/";
        yeni.SetupFCKeditor(fck);
        yeni.SetupFCKeditor(fck);
    }
    protected override void InitializeCulture()
    {
        try
        {

            HttpCookie cerez = Request.Cookies["LANG"];
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(cerez.Value);
            System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture(cerez.Value);
            base.InitializeCulture();
        }
        catch { base.InitializeCulture(); }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DB yap = new DB();
        string baslik, icerik;
        baslik = TextBox1.Text;
        icerik = fck.Value;
       
        if (baslik.Length > 75)
        {
            lblhata.Text = DB.MesajGetir("m16", false);
                
            return;
        }
       
        yap.DuyuruEkle(baslik, CheckBox1.Checked, icerik);
        lblhata.Text = DB.MesajGetir("m15", false);
    }
}
